<%- include('../../layouts/base/header', { title: '用户已登录' }) %>

<div class="min-h-screen flex items-center justify-center px-4">
    <div class="max-w-lg w-full space-y-8">
        <div class="text-center">
            <h1 class="text-3xl font-black text-gray-800 mb-2">
                您已登录!
            </h1>
        </div>

        <div class="backdrop-blur-xl rounded-xl border p-6">
            <div class="flex items-center space-x-4 mb-6">
                <%- include('../../components/avatar', { user: user, size: 'w-16 h-16', classes: 'rounded-full border border-gray-200' }) %>

                <div class="flex-1">
                    <div class="px-4 py-2 border-b border-gray-100">
                        <h3 class="text-xl font-bold text-gray-800">
                            <%= user.name || user.username %>
                        </h3>
                        <p class="text-sm text-gray-500">@<%= user.username %></p>
                    </div>
                </div>
            </div>

            <div class="space-y-3">
                <%- include('../../components/button', { text: '返回首页', href: '/', icon: 'fas fa-home', variant: 'outline', className: 'w-full justify-center py-3 text-base' }) %>
            </div>

            <div class="relative my-6">
                <div class="absolute inset-0 flex items-center">
                    <div class="w-full border-t border-gray-200"></div>
                </div>
                <div class="relative flex justify-center text-sm">
                    <span class="px-4 bg-white text-gray-500 font-medium">账户操作</span>
                </div>
            </div>

            <div class="flex space-x-3">
                <%- include('../../components/button', { text: '设置', href: '/auth/profile', icon: 'fas fa-user-cog', variant: 'outline', className: 'w-full !px-4 !py-2' }) %>
                <%- include('../../components/button', { text: '退出', href: '/auth/logout', icon: 'fas fa-sign-out-alt ', variant: 'danger', className: 'w-full !px-4 !py-2' }) %>
            </div>
        </div>

        <div class="text-center">
            <% if (user.last_login_at) { %>
                <p class="text-sm text-gray-500">
                    最后登录时间:
                    <span class="font-medium">
                        <%= user.last_login_at %>
                    </span>
                </p>
            <% } %>
        </div>
    </div>
</div>

<%- include('../../layouts/base/footer') %>